<?php class HeatherSection extends HeatherObject {
	protected $_Header = NULL;
	protected function NewSubsection (HeatherBlock $Header) {
		$this->AddChild (new HeatherSubsection ($Header));
	}

	public function __construct (HeatherBlock $Header) {
		$this->_Header = $Header;
	}

	public function AddString ($String) {
		$Length = strlen ($Trimmed = trim ($String));
		if ($Length > 3 and str_pad ('', $Length, '-') === $Trimmed) {
			$this->NewSubsection ($this->PopBlock ());
		} else {
			if ($this->NoLastChild ()) $this->NewSubsection (new HeatherBlock ());
			call_user_func (array ($this->LastChild, __FUNCTION__), $String);
		}
	}

} ?>